<?php

class AuxInitRegionLawAction extends Action {
  function _initialize() {

  }

  public function index() {
    set_time_limit(0);
    $m = M();
    $RegionList = $m->query("select * from a_region where did = 0");
    foreach ($RegionList as $k => $v) {
      $title = $v['title'];
      $id = $v["id"];
      $sql = "update a_law set dq_id = $id where luser like '%$title%'";
      $m->query($sql);
    }
    echo "finish level 1<br>";
    $RegionList = $m->query("select * from a_region where did > 0");
    foreach ($RegionList as $k => $v) {
      $title = $v['title'];
      $id = $v["id"];
      $sql = "update a_law set dq_id = $id where luser like '%$title%'";
      $m->query($sql);
    }
    echo "finish level 2";
  }




}
?>
